home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7362 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: dawn.mmm.com!news
  2. From: kjhopps@mmm.com (Kevin J Hopps)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Help on assignment
  5. Date: 22 Feb 1996 22:16:27 GMT
  6. Organization: 3M - St. Paul, MN  55144-1000 US
  7. Message-ID: <4gipvr$4ft@dawn.mmm.com>
  8. References: <4gdmjm$1kr@cloner4.netcom.com> <4gef32$6g7@reader2.ix.netcom.com>
  9. Reply-To: kjhopps@mmm.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. regmia@ix.netcom.com wrote:
  13. > dc30@ix.netcom.com(Diane Cogswell ) wrote:
  14.  
  15. > >I'm hoping someone out there can help me out. I just started c++ and
  16. > >I'm having problems with a couple assinments. Don't think I recieved
  17. > >enough information.
  18. > >The first one:
  19. > >Write a function that normally takes one argument, the address of a
  20. > >string, and prints that string once. However, if a second, type int
  21. > >argument is provided and is greater than zero, the function prints the
  22. > >string the number of times equal to the number of times indicated. 
  23.  
  24. > >Second one is 
  25. > >Write a function called zerosmaller that is passed to two int arguments
  26. > >by reference and then sets the smaller of the two numbers to 0. Write a
  27. > >main() program to exercise this function and print out the result.
  28. > >I would really appreciate any help anyone can give me. I understood
  29. > >Pascal but I'm having trouble trying to translate programs in c++. 
  30. > >Thanks 
  31. > > from discouraged
  32.  
  33.  
  34. > Ok you declare your first function like so:
  35.  
  36. > void printstring(char *thestring, int count = 0);
  37.  
  38. Doing somebody's homework for them robs them of the learning they might
  39. otherwise have received.
  40. --
  41. Kevin J. Hopps                  e-mail: kjhopps@mmm.com
  42. 3M Company                      phone:  (612) 737-4643
  43. 3M Center, Bldg. 235-2D-57      fax:    (612) 737-2700
  44. St. Paul, MN 55144-1000         Opinions are my own.  I don't speak for 3M.
  45.     But 3M speaks for me -- I did not write the following line:
  46.  
  47. Opinions expressed herein are my own and may not represent those of 3M.
  48.